<?php
class Login_model extends CI_Model {

	function __construct()
    {
        // Call the Model constructor
        parent::__construct();
    }

	function login_user ()
	{
		$this->db->where('username',$this->input->post('username'));
		$this->db->where('vm_user_paswd',sha1($this->input->post('password')));
		
		$query = $this->db->get('vm_users');
		
		if($query->num_rows == 1){
			return true;
		}
		else{
			return false;
		}
	}

}
?>